package com.xinnet.mms.enums;

/**
 * 产品类型枚举
 * 
 * @author 颜绿水
 * @author $Author:$
 * @version $Revision:$ $Date:$
 * @since 2014-6-5
 * 
 */
public enum ProductTypeEnum {

	// ChiYunUnix("V_EC_UNIX","驰云服务器UNIX"),
	// ChiYunWin("V_EC_WIN","驰云服务器WIN"),
	// Vhost("NYZJ","云服务器"),
	// Cloud("NYZJ","云虚拟主机"),
	// VPS("XNYY","VPS"),
	// Mailbox("M","邮局"),
	// Hosting("ZJZY","主机租用/托管"),
	// Jianzhan("V_MEJZ","网站");

	Domain("D", "域名"), Jianzhan("V_MEJZ", "ME建站"), Vhost("V", "虚机"), Cloud(
			"NYZJ", "云服务器"), VPS("XNYY", "VPS"), Mailbox("M", "企业邮箱"), Hosting(
			"ZJZY", "主机租用/托管"), ChiYun("CHIYUN", "驰云服务器 "), W("W", "建站 "), W_BW(
			"W_BW", "定制建站 "), A_365("A_365", "office365 "), A_NOFC("A_NOFC",
			"新办公 ");
	private String value;

	private String label;

	private ProductTypeEnum(String value, String label) {
		this.value = value;
		this.label = label;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	/**
	 * 根据value获取对应的枚举
	 * 
	 * @param value
	 * @return
	 */
	public static ProductTypeEnum getProductTypeEnmuByValue(String value) {
		ProductTypeEnum[] productEnums = ProductTypeEnum.values();
		for (ProductTypeEnum product : productEnums) {
			if (product.getValue().equalsIgnoreCase(value)) {
				return product;
			}
		}
		return null;
	}
}
